* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #2c3e50;
    color: white;
    overflow: hidden;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* 菜单样式 */
#gameMenu h1 {
    font-size: 48px;
    margin-bottom: 40px;
    color: #3498db;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-buttons button {
    padding: 15px 40px;
    font-size: 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-buttons button:hover {
    background: #2980b9;
}

/* 游戏界面样式 */
#gameScreen {
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 800px;
}

.game-header .info {
    display: flex;
    gap: 30px;
    font-size: 18px;
}

.game-header button {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

#gameCanvas {
    border: 2px solid #34495e;
    background: #34495e;
}

/* 关卡编辑器样式 */
#levelEditor {
    padding: 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.editor-container {
    display: flex;
    gap: 20px;
    height: 600px;
}

.editor-toolbar {
    width: 200px;
    background: #34495e;
    padding: 20px;
    border-radius: 5px;
}

.editor-toolbar h3 {
    margin-bottom: 15px;
    color: #3498db;
}

.tool-group {
    margin-bottom: 20px;
}

.tool-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    background: #2c3e50;
    color: white;
    border: 1px solid #3498db;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
}

.tool-btn:hover {
    background: #3498db;
}

.tool-btn.active {
    background: #3498db;
}

.editor-actions {
    margin-top: 30px;
}

.editor-actions button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.editor-actions button:hover {
    background: #229954;
}

#editorCanvas {
    border: 2px solid #34495e;
    background: #34495e;
    cursor: crosshair;
}

/* 排行榜样式 */
#scoresScreen {
    padding: 40px;
}

#scoresScreen h2 {
    margin-bottom: 30px;
    color: #3498db;
}

#scoresList {
    background: #34495e;
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
    margin: 0 auto;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #2c3e50;
}

.score-item:last-child {
    border-bottom: none;
}
